//连接数据库
const mongoose = require('mongoose');

mongoose.connect('mongodb://admin:admin@192.168.20.130:27017/node_db?authSource=admin', (err, doc) => {
    if (err) {
        return console.log(err);
    }
    // console.log('doc: ', doc);
    console.log('mongodb: 连接成功');
});
mongoose.set('strictQuery', false)
module.exports = mongoose;